//
//  HQYFoodSelectCell.m
//  Go!
//
//  Created by rimi on 16/7/11.
//  Copyright © 2016年 黄秋燕. All rights reserved.
//

#import "HQYFoodSelectCell.h"

@implementation HQYFoodSelectCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        //初始化子视图
        [self addSubsView];
    }
    return self;
}

- (void)addSubsView {
    //添加图标视图
    UIImageView *imageView = [[UIImageView alloc] init];
    imageView.bounds = CGRectMake(0, 0, CGRectGetHeight(self.frame) * 0.4, CGRectGetHeight(self.frame) * 0.4);
    imageView.center = CGPointMake(CGRectGetWidth(self.frame) * 0.5, CGRectGetHeight(self.frame) * 0.4);
    _iconImg = imageView;
    [self.contentView addSubview:_iconImg];
    
    //添加名称标签
    UILabel_Font *nameL = [[UILabel_Font alloc] init];
    nameL.frame = CGRectMake(0, CGRectGetMaxY(_iconImg.frame), CGRectGetWidth(self.frame), Size_H(20));
    nameL.font = [UIFont systemFontOfSize:Font(13)];
    nameL.textColor = [UIColor blackColor];
    nameL.textAlignment = NSTextAlignmentCenter;
    nameL.backgroundColor = [UIColor whiteColor];
    _iconName = nameL;
    [self.contentView addSubview:_iconName];
}
@end
